package com.ouyang.controller;


import com.ouyang.Service.RentPeopleService;
import com.ouyang.poji.RentPeople;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/rentpeople")
public class RentPeopleController {

    @Autowired
    private RentPeopleService rentPeopleService;

    @RequestMapping("/list")
    public String list ( Model model ) {
        List<RentPeople> list = rentPeopleService.list();
        model.addAttribute("list", list);
        return "rentpeople";
    }
}
